package com.yiruantong.system.runner;

import com.yiruantong.system.service.core.ISysOssConfigService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 初始化 system 模块对应业务数据
 *
 * @author YiRuanTong
 */
@Slf4j
@RequiredArgsConstructor
@Component
public class SystemApplicationRunner implements ApplicationRunner {

  private final ISysOssConfigService ossConfigService;

  @Override
  public void run(ApplicationArguments args) throws Exception {
    ossConfigService.init();
    log.info("初始化OSS配置成功");
  }

}
